<!DOCTYPE html><html>
<head>
<meta charset=" utf-8">
<meta name="author" content="" />
<title>客服管理-列表</title>
<style type="text/css">
.table{ 
  width:100%; 
  padding:0px; 
  margin:0px; 
  font-family:Arial, Tahoma, Verdana, Sans-Serif,宋体; 
  border-left:1px solid #ADD8E6; 
  border-collapse:collapse; 
} 
/*表头样式。*/ 
.table th{ 
  font-size:12px; 
  font-weight:600; 
  color:#303030; 
  border-right:1px solid #ADD8E6; 
  border-bottom:1px solid #ADD8E6; 
  border-top:1px solid #ADD8E6; 
  letter-spacing:2px; 
  text-align:left; 
  padding:10px 0px 10px 0px; 
  white-space:nowrap; 
  text-align:center; 
  overflow: hidden; 
} 
.table td { 
  border-right:1px solid #ADD8E6; 
  border-bottom:1px solid #ADD8E6; 
  background:#fff; 
  font-size:12px; 
  padding:3px 3px 3px 6px; 
  color:#303030; 
  word-break:break-all; 
  word-wrap:break-word; 
  white-space:normal; 
} 
</style>
</head>
<body>
<div>
  <a href="./add.html"><button>绑定客服</button></a>
</div>
<table class="table">
  <thead>
    <tr>
      <th>ID</th>
      <th>分组</th>
<!--      <th>编号</th>-->
      <th>问题</th>
      <th>答案</th>
      <th>操作</th>
    </tr>
  </thead>
  <tbody id="tbody">

  </tbody>
</table>
</body>
<script type="text/javascript" src="jquery.min.js"></script>
<script type="text/javascript">
    //-------------发送消息---------
    
    $(function () {
        var user_data = {
        };

        $.post(window.location.protocol+'//'+window.location.host+'/api/kfFaq/index?cpm=7', user_data, function (response) {
            if (response.status == true) {
                messages = response.data;
                var kf_faq_str = '';
                for (var i in messages) {
                  kf_faq_str +='<tr>';
                  kf_faq_str += '<td>'+messages[i]['id']+'</td><td>'+messages[i]['group_name']+'</td><td>'+messages[i]['question']+'</td><td>'+messages[i]['answer']+'</td><td><a href="./edit.html?id='+messages[i]['id']+'&group='+messages[i]['group']+'"><button>修改</button></a></td>';
                  kf_faq_str +='</tr>';
                }
                $('#tbody').empty('');
                $('#tbody').append(kf_faq_str);
            } else {
                console.log('获取失败!！');
            }
        }, 'json');

    });
</script>
</html